home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 4.6 KB | 166 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: DrawPrxy.h
- // Release Version: $ ODF 1 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef DRAWPRXY_H
- #define DRAWPRXY_H
-
- #ifndef BASESHP_H
- #include "BaseShp.h"
- #endif
-
- #ifndef BOUNDSHP_H
- #include "BoundShp.h"
- #endif
-
- #ifndef LINESHP_H
- #include "LineShp.h"
- #endif
-
- #ifndef OVALSHP_H
- #include "OvalShp.h"
- #endif
-
- #ifndef RECTSHP_H
- #include "RectShp.h"
- #endif
-
- #ifndef RRECTSHP_H
- #include "RRectShp.h"
- #endif
-
- #ifndef TEXTSHP_H
- #include "TextShp.h"
- #endif
-
- // ----- Part Layer -----
-
- #ifndef FWFRMING_H
- #include "FWFrming.h"
- #endif
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef SOM_ODShape_xh
- #include <Shape.xh>
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class ODFrame;
- class ODTransform;
- class CDrawPart;
-
- //========================================================================================
- // class CProxyShape
- //========================================================================================
-
- class CProxyShape : public CRectShape, public FW_MProxy
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CProxyShape)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CProxyShape(Environment* ev, const FW_CRect& rect, CDrawPart* drawPart);
- CProxyShape(Environment* ev, CDrawPart* drawPart, FW_CReadableStream& archive);
-
- virtual ~CProxyShape();
-
- //----------------------------------------------------------------------------------------
- // Inherited API from FW_MProxy
- //
- public:
- virtual void UsedShapeChanged(Environment* ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame);
-
- virtual ODShape* FrameShapeRequested(Environment* ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame,
- ODShape* requestedFrameShape);
-
- //----------------------------------------------------------------------------------------
- // Inherited API from CRectShape and CBaseShape
- //
- public:
- virtual void Removed(Environment* ev);
- virtual void Deleted(Environment* ev);
- virtual void RestoreShape(Environment *ev, CDrawPart* drawPart);
-
- virtual void RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
-
- virtual void SubtractToWindowClip(Environment *ev,
- CDrawFacetClipper* facetClipper,
- ODFacet* containingFacet,
- ODShape* windowClip,
- ODShape* tempShape);
-
- virtual void OffsetShape(Environment *ev, FW_Fixed xDelta, FW_Fixed yDelta);
- virtual void MapShape(Environment *ev, CDrawPart* part, const FW_CRect& srcRect, const FW_CRect& dstRect);
- virtual void GetHandleCenter(short whichHandle, FW_CPoint& center) const;
-
- virtual void SelectShape(Environment *ev, FW_Boolean state);
-
- virtual void ChangeRenderVerb(Environment *ev, CDrawPart* part, unsigned short renderVerb);
-
- virtual void AdjustRectForPenSize(FW_CRect& rect, FW_Fixed penSize) const;
-
- // ----- z-Order -----
- virtual void MovedAfter(Environment *ev, CBaseShape* shape);
- virtual void MovedBefore(Environment *ev, CBaseShape* shape);
- virtual void MovedFirst(Environment *ev);
- virtual void MovedLast(Environment *ev);
-
- // ----- Frozen -----
- virtual FW_Boolean SetFrozen(FW_Boolean state);
- virtual FW_Boolean IsFrozen() const;
-
- // ----- Archiving -----
- virtual void Flatten(FW_CWritableStream& archive);
- static void* Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
-
- // ----- Linking -----
- virtual void SetSubscribeLink(Environment* ev,
- CDrawSubscribeLink *subscribeLink);
- virtual void SetPublishLink(Environment* ev,
- CDrawPublishLink *subscribeLink);
- virtual FW_Boolean IsInLinkDestination(Environment* ev);
-
- //-----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void MoveBefore(Environment* ev, CProxyShape* before);
- void MoveBehind(Environment* ev, CProxyShape* behind);
-
- FW_CRect GetFrameRect(Environment* ev) const
- {return fFrameRect;}
-
- //----------------------------------------------------------------------------------------
- // Data Member
- //
- private:
- CDrawPart *fDrawPart;
- FW_Boolean fFrozen;
- FW_CRect fFrameRect; // cached frame Rect
- };
-
- #endif
-